package com.leyou.page.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

import java.util.ArrayList;
import java.util.List;

@Controller
public class HelloController {

    @GetMapping("hello")
    public String hello(Model model){
        List<String> list = new ArrayList<>();
        list.add("java");
        list.add("python");
        list.add("php");

        model.addAttribute("msg","spring boot  thymeleaf");
        model.addAttribute("list",list);
        return "hello";
    }
}
